package com.qf.conroller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wbzs,
 * @date 2022/10/25,
 * @time 20:20,
 */
@RestController
@RefreshScope//当配置发生的时候会刷新
public class testcontrolelr {

    @Value("${spring.name}")
    private  String name;

    @RequestMapping("/demo1")
    public  String getname(){

        return  name;
    }
}
